package com.raycloud.dao.dbhash;

/**
 * 获取用户相关数据所在表位置
 * @author wangyi
 *
 */
public class DbHashUtil {
	private static final int USER_RELATION = 4;
	private static final int MSG = 4;
	private static final int MSG_RELATION = 4;
	private static final int MSG_INDEX = 4;
	
	public static String getMsgDBId(long userId) {
		return String.valueOf(userId % MSG);
	}
	
	public static String getMsgRelationDBId(long userId) {
		return String.valueOf(userId % MSG_RELATION);
	}
	
	public static String getUserRelationDBId(long userId) {
		return String.valueOf(userId % USER_RELATION);
	}
	
	public static String getMsgIndex(long userId) {
		return String.valueOf(userId % MSG_INDEX);
	}
}
